#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>



int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    int c = a ^ b;
    int count = 0;
    while (c) {
        c = c & (c - 1);
        count++;
    }
    printf("%d", count);
    return 0;
}